home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / bt515.exe / BTOOLS / POSCHECK.DOC < prev    next >
Text File  |  1991-04-17  |  5KB  |  127 lines

  1. ******************************************************************************
  2.  
  3.                    POSCHECK v 1.2 - Position block checker
  4.                  Copyright (c) 1990, 1991, 1992 Novell, Inc.
  5.                                  10/28/92
  6.  
  7. ******************************************************************************
  8.  
  9. Basic information
  10. -----------------
  11.  
  12.   POSCHECK is a TSR that checks for corrupted Btrieve position blocks and
  13.     provides a trace log of Btrieve calls.
  14.  
  15.   POSCHECK intercepts Btrieve calls, compares the position block 
  16.     after the last Btrieve call to the position block before next 
  17.     Btrieve call and checks for changes made by the host program,
  18.     presumably by an erroneous memory overwrite.
  19.  
  20.   POSCHECK ignores Btrieve functions 17-21, 25, 26, and 28 since the
  21.     position block is unaffected by these functions.
  22.  
  23.   POSCHECK can print the entire position block, up to 70 bytes of the
  24.     data buffer, and the time/date of each call, before and after.
  25.  
  26.  
  27. Loading POSCHECK
  28. ----------------
  29.  
  30.   POSCHECK can only be loaded after Btrieve.
  31.  
  32.   POSCHECK requires about 11k of RAM.
  33.  
  34.   POSCHECK can only be loaded once.
  35.  
  36.   POSCHECK has five command line options
  37.  
  38.          /d : Disable printing of Data Buffer
  39.          /f : Disable output to POSCHECK.OUT
  40.          /p : Disable printing of full Pos Block
  41.          /t : Disable printing of time stamp
  42.          /v : Disable video display of Pos Block corruption
  43.          /o : Specify the output file/path
  44.               (Example - /oc:\output\poscheck.out)
  45.  
  46.     The default output file is POSCHECK.OUT in the current directory,
  47.     the default for all other options is ON.
  48.  
  49.   The following applies only if you do not use /o or if you specify a
  50.   relative path:
  51.  
  52.   *** You MUST either have POSCHECK in the same directory as the application
  53.   *** you are testing, or call POSCHECK from that directory (e.g.  invoke
  54.   *** POSCHECK with C:\UTIL\POSCHECK while you are in your application's
  55.   *** directory D:\MYAPP).  POSCHECK will not work otherwise.
  56.       (This applies only if output printing is enabled)
  57.  
  58.  
  59. Unloading POSCHECK
  60. ------------------
  61.  
  62.   POSCHECK will unload when Btrieve is unloaded.
  63.  
  64.  
  65. Output from POSCHECK
  66. --------------------
  67.  
  68.   When POSCHECK detects that the position block has been corrupted, it
  69.     will either alert the user with a screen message, or beep if visual
  70.     alerts were surpressed with the "-n" command line option.  And a 
  71.     comment will be made in the output file.
  72.  
  73.   POSCHECK creates a file POSCHECK.OUT which contains information about
  74.     every call made to Btrieve.  Each call is listed sequentially.
  75.  
  76.   The structure for POSCHECK.OUT is as follows (all numbers in hex):
  77.  
  78.  
  79. Fn     St  F0  F1  F.Name    ChekP  Chek0  Chek1  Pos Block    Comment
  80. ------------------------------------------------------------------------------
  81. 00 00  00  01  01  1234.dat  00 00  00 00  00 00  00 00 00 00  File opened
  82.  
  83.  
  84. Fnc       - Btrieve function number
  85. St        - return status
  86. F0        - internal file ID before Btrieve call
  87. F0        - internal file ID after Btrieve call
  88. F.Name    - first 8 bytes of file name
  89. ChekP     - position block checksum that Chek0 was compared against
  90. Chek0     - position block checksum after the previous call
  91. Chek1     - position block checksum before the current call
  92. Pos Block - first 4 bytes of current position block
  93. Comment   - comment from POSCHECK
  94.  
  95. An output of "--" indicates the value is not applicable at that time.
  96. Question marks indicate the value is not known at that time.
  97.  
  98. The ChekP value refers to the Chek1 value for the previous Btrieve call
  99. on the current filename.  ChekP and Check0 are the two checksums POSCHECK
  100. compares to determine if a position block was corrupted.  When they are
  101. different, the position block is corrupted (this will also be noted in the
  102. comment field).  It is not new information, but listed for convienence.
  103. If Video Display is enabled, a message will pop-up on the screen as well.
  104.  
  105. If Pos Block Printing is enabled: Underneath the status line, POSCHECK
  106. will write the full (excluding the archaic FCB) position block before and
  107. after the Btrieve call.
  108.  
  109. If time stamp printing is enabled: After the last line of each position
  110. block (before and after) POSCHECK will write the date and time the call
  111. was made, up to 1/100 of a second.  Because of the 1/18 second
  112. granularity of the CPU clock however, there is an error rate of
  113. approximately +/- 5/100 of a second.
  114.  
  115.  
  116. Miscellaneous information
  117. -------------------------
  118.  
  119.   POSCHECK can work with a maximum of 100 file names per session.
  120.  
  121.   POSCHECK continues to update the file until Btrieve is unloaded,
  122.     but the file is accessible (closed) between calls. 
  123.  
  124.   When POSCHECK is first loaded, the contents of the previous POSCHECK.OUT
  125.     will be erased.
  126.      
  127.